<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="css/style.css?version={$version}" rel="stylesheet" />
<link type="text/css" href="css/patch_function.css?version={$version}" rel="stylesheet" />
<title>登录</title>
<script language="javascript" src="js/jquery-1.11.1.min.js?version={$version}"></script>
</head>
<script>
$(function() {
  var username = '', password = '', vcode = '';

  // 提交
  $("input").bind("keypress", function(evt) {
    if (evt.keyCode == 13) {
      $("#form_submit").click();
    }
  });
  $("#form_submit").click(function() {
    username = $("#username").val();
    password = $("#password").val();
    vcode = $("#password").val();
    if(username == '') {
      hint_err('用户名为空');
      return;
    }
    if(password == '') {
      hint_err('密码为空');
      return;
    }
    if(vcode == '') {
      hint_err('验证码为空');
      return;
    }
    $("#login_form").submit();
  });
  // 刷新验证码
  $("#imgclick").click(function() {
    var src = 'aj_getVCode.php?icode='+Math.random();
    $(this).find('img').attr('src',src);
    return;
  });

  function hint_err(msg){
    $("#hint_err").append(msg).show();
  }
});
</script>
<body class="Admin_UIbody">
  <div class="Admin_xline1"></div>
  <div class="Admin_login">
    <div class="Admin_logo">管理平台</div>
    <div class="Admin_panel_wrap">
      <form method="post" id="login_form" action="" name="lform">
        <div class="Admin_panel">
          <p class="form_line clearfix"><label for="username">用户名</label><input type="text" id="username" name="username" value="" class="Admin_iptxt" />
          <span class="form_txt"></span></p>

          <p class="form_line clearfix"><label for="password">密码</label><input type="password" id="password" name="password" class="Admin_iptxt" autocomplete="off"/></p>
          <span class="form_txt"></span></p>

          <p class="form_line clearfix"><label for="vcode">验证码</label><input type="text" id="vcode" name="vcode" autocomplete="off" class="Admin_iptxt"/><a href="javascript:void(0)" id="imgclick" style="cursor:hand" title="点击更换"><img id="nowimg" width="90" height="30" style="margin:6px 0 0 6px" src="aj_getVCode.php" /></a></p>
          <span class="form_txt"></span></p>

          <p class="form_tip clearfix" id="hint_err" style="display:none;"><span class="icon_del"></span></p>

          <p class="form_button clearfix"><a href="javascript:void(0)" id="form_submit" class="login_btn"></a></p>

          <p class="form_tip clearfix" style="display:none; line-height:30px;">warning</p>
        </div>
      </form>
      <p class="copyright">Copyright &copy; 1996-2014 SINA Corporation,All Rights Reserved</p>
    </div>
  </div>
  <div class="Admin_UIplus"></div>
</body>
</html>
